home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
JCSM Shareware Collection 1993 November
/
JCSM Shareware Collection - 1993-11.iso
/
cl760
/
edgraphj.lzh
/
EXPANDME.EXE
/
lha
/
BAR1.GRF
< prev
next >
Wrap
Text File
|
1992-11-19
|
2KB
|
67 lines
{------------------------------------------------------------------------
{ BAR1.GRF - EdGraph demo program (bar graph)
{ Copyright (c) A Soft Answer, 1992.
{
{ Type - AltV to see this demo, or
{ - AltP to print it, but first...SPECIFY WHAT PRINTER YOU ARE USING:
{--------------------------------------------------------------------------}
Printer=1; { Change the value to one of these, depending on your printer:}
{ 1 = Generic 9 pin dot matrix, }
{ 2..7 = Epson: 2=MX, 3=RX, 4=FX, 5=EX, 6=LX, 7=LQ }
{ 8..9 = IBM: 8=ProPrinter, 9=QuietWriter }
{ 10 = NEC 24 pin }
{ 11 = Toshiba 24 pin }
{ 12..13 = HP: 12=DeskJet, 13=LaserJet }
{ 14 = PostScript printers }
{--------------------------------------------------------------------------}
PgHeight=120; PgWidth=150; Orientn=1; Res=1;
Initialise(Printer,PgHeight,PgWidth,Orientn,Res,"LPT1");
{ Choose font and bar filling depending on the specified printer }
Fill1=1; Fill2=50; If Printer>11; Fill1=10; Endif;
If Printer=14; {PostScript}
FontID=3;
Else;
{select font and fill style depending on printer resolution}
If ((Printer=6) or (Printer=7) or (Printer>9)) and (Res>0);
FontID=1;
Else;
FontID=0;
Endif;
Endif;
NewPlot(-3.5,0,3.5,25,30,100,20,80,0,0);
DefineFont(1,FontID,14,16,0,0,1,1,"");
DefineFont(2,FontID,12,16,0,0,1,1,"");
SelectFont(1);
AxisStyle(1,0,1,4,0,10,1,2,0,0,1,1,2,2,1);
AxisStyle(0,0,1,2,0,12,1,2,1,0,1,1,2,2,2);
box(-3.5,0,3.5,25,Fill1);
xaxis("Event",0,-3,1,2,1,0,1);
yaxis("Response",-3.5,0,5,2,1,1,1);
procedure Data1; {Note that the data can be varied by j, to}
-3+j 5.2 6.5 {shift the bars slightly left or right }
-2+j 8.3 6.4
-1+j 12.1 15.6
j 18.5 17.2
1+j 23.7 21.5
2+j 20.2 21.3
3+j 12.3 11.1
EndPoints;
EndProc;
clip(1);
Shadow(1,1,1);
SelectFont(2);
LegendTable(-3.3,24.5,43,2);
Shadow(0.5,0.5,1);
j=0.1; points(1,2,0,0,-1,5,0,Fill2,2,"Data set 2");
Data1;
j=-j; points(1,3,0,0,-1,5,0,0,1,"Data set 1");
Data1;